<br /> // ------------------------<br /> // Up their totalposts by 1 <br /> $Totalposts = $user['U_Totalposts'] + 1;<br /> $CurrTitle = $user['U_Title'];<br /> $Color = $user['U_Color'];<br />
Change to this - substitute the board's keyword where I have 'test'
Code
<br /> // ------------------------<br /> // Up their totalposts by 1 <br /> // If it's the test forum then it's navaho uping his post count<br /> // for his own kicks - then don't increase the post count<br /> if ($Board == 'test') {<br /> $Totalposts = $user['U_Totalposts'];<br /> $CurrTitle = $user['U_Title'];<br /> $Color = $user['U_Color'];<br /> } <br /> else {<br /> $Totalposts = $user['U_Totalposts'] + 1;<br /> $CurrTitle = $user['U_Title'];<br /> $Color = $user['U_Color'];<br /> } <br /><br />
Does the script that updates posts counts break this? I was running that script to see if my post count was going up after posting test posts to the boards...and they were. Then I thought, does this script count the number of posts and then update the number? D'oh!
Is this true?
Does this mean I can't use both together?? Or is there a way to edit the post count check script?
Okay, yeah...it looks like it does. It counts the rows...is there a SQL code I could enter to tell it certain values for B_Number, or whatever it is that IDs the board, should be ignored?
Success!!! sort of.... It is working (not counting posts towards the post count) except for one stingy forum. My off-topic forum at that! LOL...I'm tinkering though. Thanks for all of your help Josh E. Kins!
ok, am I missing something completely obvious here? I edited the addposts.php, uploaded (overwrite) and set permissions to 644 (same as the old file).
Nothing happens! Everything works exactly like normal and post count still increases in the selected forum. Is there something special I have to so in order for changes to take effect? The other day I also made a change to the English FAQ file but it don't show up when I click on the FAQ within the forum.
(Yeah, I know, complete newbie question, bear with me please )
Try deleting the file and then reuploading. For some reason, I've noticed that overwrite doesn't always overwrite. Before you delete it, view the file that is currently on your sever. I bet it is your old copy. If it is the new version, then you might want to contact your host and see if they migrating you do a different server. This can sometimes cause changes not show up until everything is pointing at the new server.
thanks. that's what had happened with the FAQ file. (didn't get overwritten correctly)
However, now I have ensured that the addpost file have been uploaded correctly. What happens is that the "title" does not advance but the post-count still does. So obviously I'm doing some wrong. I've added the file I have edited here, could anyone take a look and tell me what's wrong?
[] // ------------------------ // Up their totalposts by 1 // If it's the test forum then it's navaho uping his post count // for his own kicks - then don't increase the post count if ($Board == 'hca') { $Totalposts = $user['U_Totalposts']; $CurrTitle = $user['U_Title']; $Color = $user['U_Color']; } else { $Totalposts = $user['U_Totalposts'] + 1; $CurrTitle = $user['U_Title']; $Color = $user['U_Color']; }
[/]
what I would do is go to any IIP pal box or actually anywhere I could insert something that would show and include this command
print_r($user); and then look at the results to make sure it actually lists what you want it to. you may not even have that stuff in your $user array or it may be titled something else..
thanks....hmmm...before I can test it though a "IIP pal box" I guess I need to install IIP 5.4.4 first, it's all set up but I need to do a database backup before I complete the install and can't do that myself (need to contact my host)...
hmmm.. this is all more complicated than I thought, seemed to be easy at first
Off the top of my head, I would say to check the board keyword. Remember, the keywords are case sensative. Otherwise that snippit of code looks good to me.
Magle you can't backup your own database you have to contact your host? onder: Thats strange onder: Anyways you could also try and enter it anywhere else like I don't know a generic threads page?
[]Backup Complete w3t_AddressBook.sql is 0 bytes or did not get created.w3t_Banned.sql is 0 bytes or did not get created.w3t_Boards.sql is 0 bytes or did not get created.w3t_Cache.sql is 0 bytes or did not get created.w3t_Calendar.sql is 0 bytes or did not get created.w3t_Category.sql is 0 bytes or did not get created.w3t_DisplayNames.sql is 0 bytes or did not get created.w3t_Favorites.sql is 0 bytes or did not get created.w3t_Graemlins.sql is 0 bytes or did not get created.w3t_Groups.sql is 0 bytes or did not get created.w3t_Languages.sql is 0 bytes or did not get created.w3t_Last.sql is 0 bytes or did not get created.w3t_Mailer.sql is 0 bytes or did not get created.w3t_Messages.sql is 0 bytes or did not get created.w3t_ModNotify.sql is 0 bytes or did not get created.w3t_Moderators.sql is 0 bytes or did not get created.w3t_Online.sql is 0 bytes or did not get created.w3t_PollMain.sql is 0 bytes or did not get created.w3t_PollOptions.sql is 0 bytes or did not get created.w3t_PollQuestions.sql is 0 bytes or did not get created.w3t_PollVotes.sql is 0 bytes or did not get created.w3t_Posts.sql is 0 bytes or did not get created.w3t_Queries.sql is 0 bytes or did not get created.w3t_Ratings.sql is 0 bytes or did not get created.w3t_Subscribe.sql is 0 bytes or did not get created.w3t_Users.sql is 0 bytes or did not get created.w3t_Version.sql is 0 bytes or did not get created.
You will need to verify that this command actually backed up the selected tables.[/]
I belive all paths have been set correctly and the backup directory is wrtiable etc....
[]scroungr said: Anyways you could also try and enter it anywhere else like I don't know a generic threads page? [/]
anyway, I'm sorry, but I'm not 100% sure I understand what you mean by that...wouldn't the code automatically not work if taken out of context? if not, where would I add the additonal code (print_r($user);)?
...guess there's no hiding that I'm not a developer myself, just a lowly user
I would load up a Generic Threads Page and in the area where you put the code or html you want to use I would put that print_r command. The generic Page can be found in the modifications section here. About your backing up you are trying to backup your files and can't I see where is the directory for backing up? in the admin section of your threads it says it is writable when you click on the check? you could also try and download the phpMyBackup that a few of us use that backs up your whole mysql database not the individual files. This can be ran from your home directory.
(slayer> I double checked the "keyword" I'm 100% sure it's correct)
I did test the backup directory, and it passed.
however, poking around a little.
wouldn't this need to be changed too?: [] // -------------------------------------- // Now update some stuff in their profile $query = " UPDATE {$config['tbprefix']}Users SET U_Totalposts = U_Totalposts + 1, U_Laston = '$date', U_Title = '$UserTitle_q' WHERE U_Number = '{$user['U_Number']}' "; $dbh -> do_query($query); } [/]
[qoute] // -------------------------------------- // Now update some stuff in their profile if ($Board == 'hca') { $query = " UPDATE {$config['tbprefix']}Users SET U_Totalposts = U_Totalposts, U_Laston = '$date', U_Title = '$UserTitle_q' WHERE U_Number = '{$user['U_Number']}' "; $dbh -> do_query($query); } } else { $query = " UPDATE {$config['tbprefix']}Users SET U_Totalposts = U_Totalposts + 1, U_Laston = '$date', U_Title = '$UserTitle_q' WHERE U_Number = '{$user['U_Number']}' "; $dbh -> do_query($query); } } [/qoute]
I *think* that should be right. This is totally untested, my skillz are...limited, and I haven't applied this myself. But it does look to me like that needs to be changed and this code should be correct.
It looked to me like the closing was already there for something else. One closing for the if statement, and one for the closing that was already there. I figured that there was a more elegant way to do it, but I wasn't sure how it should be formatted to account for the existing close.
Would this be better:
// -------------------------------------- // Now update some stuff in their profile if ($Board == 'hca') { $query = " UPDATE {$config['tbprefix']}Users SET U_Totalposts = U_Totalposts, U_Laston = '$date', U_Title = '$UserTitle_q' WHERE U_Number = '{$user['U_Number']}' "; $dbh -> do_query($query); } else { $query = " UPDATE {$config['tbprefix']}Users SET U_Totalposts = U_Totalposts + 1, U_Laston = '$date', U_Title = '$UserTitle_q' WHERE U_Number = '{$user['U_Number']}' "; $dbh -> do_query($query); } }
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.